<template>
  <div>
    <h1 class="h1_line" @click="choiceness">精选专题&gt;</h1>

    <div class="special_box_container">
      <div
        class="special_box_flex"
        v-for="(item, index) in getZhuanti"
        :key="index"
      >
        <img :src="item.pic" alt="" @click="onClickDetail(item.id)" />
        <div class="zhuanti_flex_box1_title">
          <h5>{{ item.title }}</h5>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      getZhuanti: [],
    };
  },
  mounted() {
    this.$API.getZhuanti().then((res) => {
      console.log(res.data.data);
      this.getZhuanti = res.data.data;
    });
  },
  methods: {
    //精选专题
    choiceness() {
      this.$router.push({ path: "/about" });
    },
    onClickDetail(id){
      this.$router.push({ path: "/Jump",query:{id} });
    },
    
    // addlists(id) {
    //   console.log(id);
    //   this.$router.push({ path: "/detail", query: { id } });
    // },
  },
};
</script>

<style lang="scss">
.h1_line {
  width: 100%;
  height: 1rem;
  line-height: 1rem;
  background-color: white;
  text-align: center;
  font-size: 0.4rem;
  margin-top: 0.3rem;
}
.special_box_container {
  width: 100%;
  display: flex;
  overflow: scroll;
  .special_box_flex {
    width: 95%;
    background-color: white;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    .zhuanti_flex_box1_title {
      width: 100%;
      display: flex;
    }
    img {
      width: 95vw;
      height: 80%;
    }
  }
}
</style>